import request from '@/utils/request'

//01 共-文件上传
export const knowledgeUploadServe = (obj) => {
  return request.post('/fd/pdfs', { ...obj })
}
//02 共 获取文件列表
export const knowledgeGetServe = (obj) => {
  return request.get('/pdfs', { params: { ...obj } })
}
//03 共- 查看文件
// export const showFileUrl = '/api/pdfs/show?id='
export const knowledgeShowServe = (id) => {
  return request.get('/pdfs/show', { params: { id }, responseType: 'blob' })
}
//04 管-删除文件
export const knowledgeDelServe = (id) => {
  return request.delete('/pdfs/del', { params: { id } })
}
//05 维-删除个人上传的文件
export const knowledgeStuDelServe = (id) => {
  return request.delete('/pdfs/stu/del', { params: { id } })
}
//06 各自 编辑个人上传的文件
export const knowledgeEditServe = (obj) => {
  return request.put('/fd/pdfs/edit', { ...obj })
}
